package net.mingsoft.document.dao;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import net.mingsoft.document.action.r.statistic.FileStatisticResponse;
import net.mingsoft.document.entity.FileLogEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author genfa
 * @date 22/01/28
 */
public interface FileLogDao {

    int insertOne(FileLogEntity entity);

    Page<FileLogEntity> selectList(@Param("page") Page<?> page, @Param("fileId") String fileId);

    List<FileStatisticResponse> countFileLogGroupByOpType(@Param("beginDate") String beginDate, @Param("endDate") String endDate,
                                                          @Param("type") String type, @Param("hours") Integer hours);

    List<FileStatisticResponse> countFileLogGroupByOpTypePerDay(@Param("beginDate") String beginDate, @Param("endDate") String endDate,
                                                                @Param("type") String type);
}
